/*
全局类，主要用来显示提示信息
*/
window.clientGlobal = {
    tipsWord : -1,
    showTipsWord : function(curStr){
    	self.tipsWord.stopAllActions();
        self.tipsWord.getChildByName("str").getComponent("cc.Label").string = curStr;
    	self.tipsWord.opacity = 0;
        self.tipsWord.runAction(cc.sequence(cc.fadeIn(0.5),cc.delayTime(3),cc.fadeOut(0.5)));
        //根据字符串长度动态变化背景长度
        if(curStr.length <= 3)
        {
            self.tipsWord.getChildByName("boxBg2").scaleX =  0.3;
        }
        else
        {
            self.tipsWord.getChildByName("boxBg2").scaleX =  0.3 + (curStr.length - 3) * 0.05;
        }
        if(curStr == "下爆了")
        {
            self.tipsWord.getChildByName("boxBg2").active = false
            self.tipsWord.getChildByName("str").active = false
            self.tipsWord.getChildByName("gameStatus").active = true
    		if(self.curSex == 2)
    			window.DKTools.audioEG.playEffect("tips_betMax0");
    		else
                window.DKTools.audioEG.playEffect("tips_betMax1");
        }
        else
        {
            self.tipsWord.getChildByName("boxBg2").active = true
            self.tipsWord.getChildByName("str").active = true
            self.tipsWord.getChildByName("gameStatus").active = false 
        }
    },
    curSex : 0,
    tipsBox : -1,
    exitBox : -1,
    exitClickCount : 0,
    exitLastClickTime : 0,
    loadingNode : -1
};

var self = window.clientGlobal;